<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTravelsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('travels', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('uid')->comment('发表人id');
            $table->string('title')->comment('游记标题');
            $table->text('description')->comment('游记描述');
            $table->longText('content')->comment('游记内容');
            $table->string('img')->comment('列表封面图');
            $table->string('banner')->comment('详情页banner');
            $table->bigInteger('zan')->default('0')->comment('点赞数');
            $table->bigInteger('browse')->default('0')->comment('浏览量');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('travels');
    }
}
